package com.todo.content.application.mq.receiver;

import com.alibaba.fastjson.JSONObject;
import com.todo.content.application.base.conf.ContentRabbitConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author azhebuxing
 * @date 2024/12/11 02:40
 * @description
 */
@Slf4j
@Component
public class ContentExamineReceiver {

    @RabbitListener(queues = ContentRabbitConfig.CONTENT_EXAMINE_QUEUE)
    public void receiveMessage(Message message) {
        log.info("ContentExamineReceiver#receiveMessage message:{}", JSONObject.toJSONString(message));
        log.info("ContentExamineReceiver#receiveMessage :{}", JSONObject.toJSONString(new String(message.getBody())));

    }
}
